{extend name="Layout/layout"}
{block name="body_content"}
<ul class="nav nav-tabs" style='margin-bottom: 20px;'>
    {foreach $menus as $vo}
    {if condition="$vo['active']"}
    <li class="active"><a href="{$vo.url}">{$vo.title}</a></li>
    {else/}
    <li><a href="{$vo.url}">{$vo.title}</a></li>
    {/if}
    {/foreach}
</ul>
<form class="form-horizontal" action="{:url('edit_user_save')}" method="post">
    <div class="form-group">
        <label class="col-sm-2 control-label">电子邮件</label>
        <div class="col-sm-10">
            <input type="email" name="email" class="form-control" placeholder="电子邮件" value="{$data.email}" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">手机号码</label>
        <div class="col-sm-10">
            <input type="text" name="mobile" class="form-control" placeholder="手机号码" value="{$data.mobile}" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">姓名</label>
        <div class="col-sm-10">
            <input type="text" name="name" class="form-control" placeholder="姓名" value="{$data.name}" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">用户头像</label>
        <div class="col-sm-7">
            <input type="text" name="face_url" class="form-control"  placeholder="用户头像" size="60" value="{$data.face_url}" />
        </div>
        <div class="col-sm-3">
            <a href="####" target="_blank" title=""><img src="{$data.face_url}" data-src="/skin/theme/sueuix5/images/noimage.gif" alt="" class="xsui-img-32" style="vertical-align: middle;" /></a><a href="{:url('Upload/delete')}" title="删除图片" class="xsui-btn-singlefile-delete-image" data-url="{$data.face_url}">[删除]</a><a class="xsui-btn-single-uploader" href="{:url('Upload/single_file','name=face_url')}" title="选择图片并上传">[上传]</a>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">备注信息</label>
        <div class="col-sm-10">
            <input type="text" name="remark" class="form-control"  placeholder="备注信息" size="79" value="{$data.remark}" />
        </div>
    </div>
    <div class="form-group xsui-form-mgb">
        <label class="col-sm-2 control-label">状态：</label>
        <div class="col-sm-10">
            <input type="radio" name="status" value="1" checked="checked" required="required" />正常 <input type="radio" name="status" value="0" required="required" />禁用
            <input type="hidden" id="status-value" value="{$data.status}" />
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <button type="submit" class="btn btn-primary">保存</button>
        </div>
    </div>
    <input type="hidden" name="id" value="{$data.id}" />
</form>
<script src="/skin/theme/sueuix5/ctrl/layout/layout.js"></script>
<script type="text/javascript">
    // 状态选择
    $('[name="status"][value="' + $('#status-value').val() + '"]').prop('checked', true);
    // 2016-12-28
    $('.dropdown-toggle').dropdown();
    // 2016-12-29
    $(document).ready(function () {
        layout_ui_init();
    })
    /**
     * 单文件上传回调函数
     * @param {type} name
     * @param {type} value
     * @returns {undefined}
     * @version 1.0 2016-12-15
     */
    function single_uploader_cb(name, value) {
        var $input = $('[name="' + name + '"]');
        $input.val(value)
        $input.parent().parent().find('img').attr('src', value).parent().attr({'href': value, 'title': value}).next().data('url', value);
        layer.closeAll();
    }
</script>
{/block}